package com.jiahe.video.model;

public class TokenInfo {

    private String token;
    private String nickname;
    private Long expireTime;

    public void build(String token,String nickname, Long expireTime) {
        this.token = token;
        this.nickname = nickname;
        this.expireTime = expireTime * 1000;
    }

    public  String getNickname(){
        return nickname;
    }

    public String getToken() {
        if (this.expireTime==null || System.currentTimeMillis() >= this.expireTime) {
            return null;
        }
        return this.token;
    }

}
